<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Hammerspoon docs: Token</title>
    <style type="text/css">
      a { text-decoration: none; }
      a:hover { text-decoration: underline; }
      th { background-color: #DDDDDD; vertical-align: top; padding: 3px; }
      td { width: 100%; background-color: #EEEEEE; vertical-align: top; padding: 3px; }
      table { width: 100% ; border: 1px solid #0; text-align: left; }
      section > table table td { width: 0; }
    </style>
    <link rel="stylesheet" href="docs.css" type="text/css" media="screen" />
  </head>
  <body>
    <header>
      <h1><a href="./index.html">docs</a> &raquo; Token</h1>
      <p>generate google authenticator token value keystrokes
Retrieve a google authenticator token seed from keychain and use this to calculate the current value
Simulate keystrokes for this token value</p>
<p>written by Teun Vink <a href="mailto:github@teun.tv">github@teun.tv</a>, converted to spoon by Tyler Thrailkill <snowe></p>
<p><a href="https://github.com/teunvink/hammerspoon">https://github.com/teunvink/hammerspoon</a></p>

      </header>
      <h3>API Overview</h3>
      <ul>
        <li>Variables - Configurable values</li>
          <ul>
            <li><a href="#logger">logger</a></li>
            <li><a href="#secret_key">secret_key</a></li>
          </ul>
        <li>Methods - API calls which can only be made on an object returned by a constructor</li>
          <ul>
            <li><a href="#bindHotkeys">bindHotkeys</a></li>
            <li><a href="#get_token">get_token</a></li>
            <li><a href="#token_keystroke">token_keystroke</a></li>
          </ul>
      </ul>
      <h3>API Documentation</h3>
        <h4 class="documentation-section">Variables</h4>
          <section id="logger">
            <a name="//apple_ref/cpp/Variable/logger" class="dashAnchor"></a>
            <h5><a href="#logger">logger</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Token.logger</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Variable</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon.</p>
</td>
              </tr>
            </table>
          </section>
          <section id="secret_key">
            <a name="//apple_ref/cpp/Variable/secret_key" class="dashAnchor"></a>
            <h5><a href="#secret_key">secret_key</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Token.secret_key</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Variable</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>String indicating the Keychain name of the Shared Key used in the OTP HMAC-SHA1 generation</p>
</td>
              </tr>
            </table>
          </section>
        <h4 class="documentation-section">Methods</h4>
          <section id="bindHotkeys">
            <a name="//apple_ref/cpp/Method/bindHotkeys" class="dashAnchor"></a>
            <h5><a href="#bindHotkeys">bindHotkeys</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Token:bindHotkeys(mapping)</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Binds hotkeys for Token</p>
<p>Parameters:</p>
<ul>
<li>mapping - A table containing hotkey modifier/key details for the following items:<ul>
<li>generate - generate and type token</li>
</ul>
</li>
</ul>
</td>
              </tr>
            </table>
          </section>
          <section id="get_token">
            <a name="//apple_ref/cpp/Method/get_token" class="dashAnchor"></a>
            <h5><a href="#get_token">get_token</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Token:get_token()</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>Retrieves the token using an HOTP/TOTP Secret Key stored in the keychain</p>
</td>
              </tr>
            </table>
          </section>
          <section id="token_keystroke">
            <a name="//apple_ref/cpp/Method/token_keystroke" class="dashAnchor"></a>
            <h5><a href="#token_keystroke">token_keystroke</a></h5>
            <table>
              <tr>
                <th>Signature</th>
                <td><code>Token:token_keystroke()</code></td>
              </tr>
              <tr>
                <th>Type</th>
                <td>Method</td>
              </tr>
              <tr>
                <th>Description</th>
                <td><p>read a token secret key from keychain, generate a code and make keystrokes for it</p>
</td>
              </tr>
            </table>
          </section>
  </body>
</html>